Skip to content

Migrate habitat-lab to habitat-sim agent-sensor-decoupling API#2220

Merged
aclegg3 merged 9 commits intomainfrom
agent-sensor-decoupling-refactor
Feb 21, 2026
Merged

Migrate habitat-lab to habitat-sim agent-sensor-decoupling API#2220
aclegg3 merged 9 commits intomainfrom
agent-sensor-decoupling-refactor

Conversation

@aclegg3
Copy link
Contributor

@aclegg3 aclegg3 commented Feb 20, 2026

Companion to: facebookresearch/habitat-sim#2621

Motivation and Context

Adapt habitat-lab to the new public sensor API from habitat-sim PR #2621 (agent-sensor-decoupling branch). Key changes:

  • Replace all private _sensors dict access with public sim.sensors property
  • Replace _sim._sensors[name]._sensor_object with sim.get_sensor(name).sensor_object
  • Replace agent._sensors with agent.sensors (live C++ subtree view)
  • Simplify instance_image_nav_task sensor lifecycle to use sim.remove_sensor() instead of manual multi-dict cleanup
  • Remove Python name-mangling (_Simulator__sensors) from debug_visualizer and its tests; use sim.sensors registry directly

How Has This Been Tested

Update CI workflow to build habitat-sim from the PR branch

Types of changes

  • [Refactoring] Large changes to the code that improve its functionality or performance

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation if required.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes if required.

Adapt habitat-lab to the new public sensor API from habitat-sim PR #2621
(agent-sensor-decoupling branch). Key changes:

- Replace all private _sensors dict access with public sim.sensors property
- Replace _sim._sensors[name]._sensor_object with sim.get_sensor(name).sensor_object
- Replace agent._sensors with agent.sensors (live C++ subtree view)
- Simplify instance_image_nav_task sensor lifecycle to use
  sim.remove_sensor() instead of manual multi-dict cleanup
- Remove Python name-mangling (_Simulator__sensors) from debug_visualizer
  and its tests; use sim.sensors registry directly
- Update CI workflow to build habitat-sim from the PR branch

Companion to: facebookresearch/habitat-sim#2621
@aclegg3 aclegg3 requested a review from jturner65 February 20, 2026 14:21
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 20, 2026
aclegg3 and others added 8 commits February 20, 2026 08:04
Adapt habitat-lab to the new public sensor API from habitat-sim PR #2621
(agent-sensor-decoupling branch). Key changes:

- Replace all private _sensors dict access with public sim.sensors property
- Replace _sim._sensors[name]._sensor_object with sim.get_sensor(name).sensor_object
- Replace agent._sensors with agent.sensors (live C++ subtree view)
- Simplify instance_image_nav_task sensor lifecycle to use
  sim.remove_sensor() instead of manual multi-dict cleanup
- Remove Python name-mangling (_Simulator__sensors) from debug_visualizer
  and its tests; use sim.sensors registry directly
- Update CI workflow to build habitat-sim from the PR branch

Companion to: facebookresearch/habitat-sim#2621
Bump language-formatters-pre-commit-hooks from v2.3.0 to v2.14.0 to
resolve 'ModuleNotFoundError: No module named pkg_resources' on
Python 3.12+ (pkg_resources was removed from setuptools).

Also bump toml-sort from 0.21.0 to 0.23.1 as required by the updated
hooks package (v2.14.0 requires toml-sort>=0.22.0).

Includes auto-fixed formatting in mypy.ini, setup.cfg, and pyproject.toml
from the updated pretty-format-ini and pretty-format-toml hooks.
habitat-sim has migrated from setup.py to scikit-build-core (pyproject.toml).
Direct 'python setup.py install' no longer works.

Updated:
- CI workflow: use 'pip install . --no-build-isolation' with env vars
  (HABITAT_BUILD_GUI_VIEWERS=OFF, HABITAT_WITH_CUDA=ON, HABITAT_WITH_BULLET=ON)
- Dockerfile: same pip-based build, bump Python to 3.12
- habitat-hitl README: update build example to new env var syntax
The --no-build-isolation flag skips automatic installation of build
dependencies from pyproject.toml. Add explicit pip install of
scikit-build-core and pybind11 which are required by habitat-sim's
new scikit-build-core build system.
The aihabitat-nightly conda channel only has habitat-sim packages for
Python 3.10 and 3.11. Pin the non-editable-install and bdist-install
environments to Python 3.11 so they can install the nightly packages.
The sdist-install environment inherits from bdist-install via clone.

The main test environment stays at Python 3.12 (builds from source).
…ource

Revert the habitat-sim build step to install from the aihabitat-nightly
conda channel instead of cloning and building a specific branch. This
will fail until the habitat-sim agent-sensor-decoupling PR is merged
and a nightly build is published with the new API.

Also pin the main test environment to Python 3.11 since the nightly
conda channel only publishes habitat-sim packages for 3.10 and 3.11.
@aclegg3
Copy link
Contributor Author

aclegg3 commented Feb 21, 2026

Tests passed with build from source off the sim PR branch. These tests now won't pass until tomorrow when nightly is updated and both PRs are merged. Merging now.

@aclegg3 aclegg3 merged commit a9c8df5 into main Feb 21, 2026
3 of 4 checks passed
@aclegg3 aclegg3 deleted the agent-sensor-decoupling-refactor branch February 21, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants